From: Caolán McNamara Date: Fri, 12 Jun 2026 19:17:25 +0000 (+0000) Subject: [PATCH] translate only file URLs X-Git-Tag: archive/raspbian/4%25.2.3-2+rpi1+deb13u8^2~17 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ef021664248e0d639ca8b62fb60607233ed5bb5d;p=libreoffice.git [PATCH] translate only file URLs Change-Id: I41076b8af670d673bf29b14c02db0c66744feb0b Signed-off-by: Caolán McNamara Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4409 Tested-by: Jenkins CPCI Reviewed-by: Stephan Bergmann (cherry picked from commit 478eb7de0d14a05e6501bd44851f73ec0df5c59a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206635 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit e663f8baed49976fd4d4d6d1c277ab036cd28736) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206672 Gbp-Pq: Name CVE-2026-63277.diff --- diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx index 95915196bad..bb0b16bc022 100644 --- a/jvmaccess/source/classpath.cxx +++ b/jvmaccess/source/classpath.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -76,6 +77,14 @@ jobjectArray jvmaccess::ClassPath::translateToUrls( nullptr, anyEx ); } } + css::uno::Reference< css::uri::XUriReference > uriRef( + css::uri::UriReferenceFactory::create(context)->parse(url)); + if (!uriRef.is() || !uriRef->getScheme().equalsIgnoreAsciiCase("file")) + { + throw css::lang::IllegalArgumentException( + "non-local Java class path entry: " + url, + css::uno::Reference< css::uno::XInterface >(), 0); + } jvalue arg; arg.l = environment->NewString( reinterpret_cast< jchar const * >(url.getStr()),